package com.minelx.statementsplus;

import java.util.List;
import java.util.Objects;

public class MajorSqlHead {
	private final String content;

	private final String loopId;

	private final List<String> mappingKeys;

	public MajorSqlHead(String content, String loopId, List<String> mappingKeys) {
		this.content = content;
		this.loopId = loopId;
		this.mappingKeys = mappingKeys;
	}

	public String content() {
		return content;
	}

	public String loopId() {
		return loopId;
	}

	public List<String> mappingKeys() {
		return mappingKeys;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;
		MajorSqlHead majorSqlHead = (MajorSqlHead) o;
		return content.equals(majorSqlHead.content) && loopId.equals(majorSqlHead.loopId) && mappingKeys.equals(majorSqlHead.mappingKeys);
	}

	@Override
	public int hashCode() {
		return Objects.hash(content, loopId, mappingKeys);
	}

	@Override
	public String toString() {
		return "MajorSql{" +
				"content='" + content + '\'' +
				", loopId='" + loopId + '\'' +
				", mappingKeys=" + mappingKeys +
				'}';
	}
}
